package cn.nubia.admin.application.bean;

import cn.nubia.admin.common.mybatis.annotations.Column;
import cn.nubia.admin.common.mybatis.annotations.Id;
import cn.nubia.admin.common.mybatis.annotations.Table;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * CREATE TABLE `nb_channel` (
 `channel_id` int(11) NOT NULL DEFAULT '0' COMMENT '渠道商编号',
 `channel_name` char(10) DEFAULT NULL COMMENT '渠道商名称',
 `channel_tag` char(10) DEFAULT NULL COMMENT '渠道商标识',
 `channel_state` char(10) DEFAULT NULL COMMENT '渠道商状态（-1 删除 0 隐藏 1 显示）',
 `last_modify_time` char(10) DEFAULT NULL COMMENT '最后修改时间',
 PRIMARY KEY (`channel_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='[渠道商表';

 SET FOREIGN_KEY_CHECKS = 1;
 * Created by justin on 15/7/11.
 */
@Table(value = "nb_channel")
public class Channel implements Serializable{

    private static final long serialVersionUID = -8244661101951482489L;

    public static final int STATE_SHOW = 1;
    public static final int STATE_HIDDEN = 0;
    public static final int STATE_DEL = -1;

    public static final String COLUMN_CHANNELNAME="channelName";
    public static final String COLUMN_STATE="state";
    public static final String COLUMN_LASTMODIFYTIME="lastModifyTime";


    @Id(value = "channel_id")
    private Integer id;
    @NotEmpty(message = "{channel.channelName.null}")
    @Column(value = "channel_name")
    private String channelName;
    @NotEmpty(message = "{channel.channelTag.null}")
    @Column(value = "channel_tag")
    private String channelTag;
    @NotNull(message = "{channel.state.null}")
    @Column(value = "channel_state")
    private Integer state;
    @Column(value = "last_modify_time")
    private Integer lastModifyTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public String getChannelTag() {
        return channelTag;
    }

    public void setChannelTag(String channelTag) {
        this.channelTag = channelTag;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getLastModifyTime() {
        return lastModifyTime;
    }

    public void setLastModifyTime(Integer lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }
}
